package com.health.home.service.lmpl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.health.common.core.utils.StringUtils;
import com.health.home.domain.po.TnewsPo;
import com.health.home.domain.vo.TnewVo;
import com.health.home.mapper.newMapper;
import com.health.home.service.NewService;
import freemarker.template.utility.StringUtil;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author xpz
 * @date 2024/12/16 10:37
 */
@Service
public class newServicelmpl extends ServiceImpl<newMapper, TnewsPo> implements NewService{
    @Override
    public List<TnewsPo> newList(TnewVo tnewVo) {
        LambdaQueryWrapper<TnewsPo> wrapper = new LambdaQueryWrapper<>();
        if (StringUtils.isNotBlank(tnewVo.getNewsTitle())){
            wrapper.eq(TnewsPo::getNewsTitle,tnewVo.getNewsTitle());
        }
        List<TnewsPo> list = list(wrapper);
        return list;
    }
}
